]> dgit.raspbian.org Git - dovecot.git/commit
[PATCH 1/2] login-common: Fix crash when XCLIENT FORWARD= base64 contains NUL byte
authorTimo Sirainen <timo.sirainen@open-xchange.com>
Sun, 3 May 2026 16:20:00 +0000 (16:20 +0000)
committerNoah Meyerhans <noahm@debian.org>
Wed, 16 Sep 2026 19:06:35 +0000 (15:06 -0400)
commit5e83291d6e3f6a2a8b7942fddcfe36ab1f1a9878
treee445ecd722a83c753ead5c317a822ec91a301ac4
parentb5535c1d0bfbec6b48e40387ff94532eb10106b0
[PATCH 1/2] login-common: Fix crash when XCLIENT FORWARD= base64 contains NUL byte

Sending "XCLIENT FORWARD=AA==" (base64 for a single NUL byte) followed
by a regular login crashed pop3-login (and other login services) with:

  Panic: file ../../src/lib/array.h: line 275 (array_idx_i):
  assertion failed: (idx < array->buffer->used / array->element_size)

p_strsplit_tabescaped() truncates at the first NUL, so an all-NUL
payload produced an empty fields list. forward_fields was still
created (but empty), and the later array_front() call in
sasl_server_auth_begin() then panicked on the empty array.

Reject empty payloads and payloads containing NUL bytes during base64
decode, so the array is never created in this case.

Gbp-Pq: Name 0001-login-common-Fix-crash-when-XCLIENT-FORWARD-base64-c.patch
src/login-common/client-common.c